		<style lang="less" scoped>
			*{
				margin: 0;
				padding: 0;
			}
			body,html{
				overflow: hidden;
			}
			ul{
				list-style: none;
			}
			.bigChoose{
			    width: 1080px;
			    height: 1920px;
			    background: url(../../images/bigChooseBg.png) no-repeat;
			    margin: 0 auto;
			    overflow: hidden;
			    position: relative;
			    font-family: "微软雅黑";
			}
			.bigChoose-div{
				width: 987px;
				height: 1114px;
				margin: 280px auto 0;
				overflow: hidden;
			}
			.bigChoose-div:hover{
				overflow: auto;
			}
			.bigChoose-div li{
				width: 100%;
				height: 526px;
				background-color: white;
				margin-bottom: 60px;
				overflow: hidden;
			}
			.bigChoose-div-left{
				width: 288px;
				height: 452px;
				float: left;
				margin-top: 38px;
                margin-left: 41px;
                position: relative;
                .div{
                    transform: scale(0.74);
                    position: absolute;
                    top: -79px;
                    left: -48px;
                }
			}
			.bigChoose-div-left img{
				width: 100%;
				height: 100%;
			}
			.bigChoose-div-right{
				width: 576px;
				height: 452px;
				float: left;
				margin-top: 38px;
				margin-left: 41px;
				color: #999;
			}
			.bigChoose-div-right-name{
				font-size: 72px;
				line-height: 100px;
				color: #666;
				font-weight: 300;
			}
			.bigChoose-div-right-time{
				font-size: 32px;
				line-height: 45px;
				margin-top: 9px;
				font-weight: 300;
			}
			.bigChoose-div-right-info{
				font-size: 32px;
				height: 187px;
				font-weight: 300;
				text-align: justify;
                margin-top: 119px;
                overflow: hidden;
			}
			.backto-bighome{
				position: fixed;
				left: 0;
				top: 20%;
				width: 72px;
				height: 144px;
			}
			.backto-bighome img{
				width: 100%;
				height: 100%;
			}
		</style>
<template>
<div>
    <div class="bigChoose">
			<ul class="bigChoose-div">
				<li v-for="(item,index) in datalist" @click="hrefFn(index)">
					<!--左侧图-->
					<div class="bigChoose-div-left">
						<div class="div">
                            <div :style="item.IntroduceModule.headerStyle">
                                <!--头像-->
                                <div :style="item.IntroduceModule.moduleImageDivStyle"><img :src="hotsimg+item.IntroduceModule.cemeteryIntroduction.headPictureSource" style="width: 100%;height: 100%;"/></div>
                                <!--姓名-->
                                <div :style="item.IntroduceModule.nameStyle" ref="nameStyle">{{item.IntroduceModule.cemeteryIntroduction.userName}}</div>
                                <!--出生日期-->
                                <div :style="item.IntroduceModule.introductionDayStyle" ref="introductionStyle">{{birthdayTime(item.IntroduceModule.cemeteryIntroduction.birthDay)+birthDayAnd+birthdayTime(item.IntroduceModule.cemeteryIntroduction.deadDay)}}</div>
                                <!--个人简介-->
                                <div :style="item.IntroduceModule.introductionStyle" ref="introductionDayStyle">{{item.IntroduceModule.cemeteryIntroduction.introduction}}</div>			
                                <v-edittext :textflag="item.IntroduceModule.templateModuleContent"></v-edittext>
                                <img  :src="hotsimg+item1.picSourcePath" v-for="(item1,index) in item.IntroduceModule.templateModulePicDTO" ref="picstyle" :style="item1.picStyle">
                                <img  :src="hotsimg+item1.videoPicSourcePath" v-for="(item1,index) in item.IntroduceModule.templateModuleVideoDTO" ref="spstyle" :style="item1.videoStyle">
                            </div>
                        </div>
					</div>
					<!--右侧内容-->
					<div class="bigChoose-div-right">
						<p class="bigChoose-div-right-name" v-text="item.IntroduceModule.cemeteryIntroduction.userName"></p>
						<p class="bigChoose-div-right-time">{{birthdayTime(item.IntroduceModule.cemeteryIntroduction.birthDay)+birthDayAnd+birthdayTime(item.IntroduceModule.cemeteryIntroduction.deadDay)}}</p>
						<p class="bigChoose-div-right-info">{{item.IntroduceModule.cemeteryIntroduction.introduction}}</p>
					</div>
				</li>
			</ul>
		</div>
		<a :href="threeUrl+'/largescreen'" class="backto-bighome"><img src="../../images/lybcak.png"/></a>
</div>
	
</template>
<script>
    import { mapState } from 'vuex';
    import global from '../../config/global'
    export default {
		data(){
			return{
                datalist:"",
                hotsimg:global.imgurl,//图片前缀
                threeUrl:global.threeUrl,//
                birthDayAnd:""
			}
        },
        computed: {...mapState({ user: state => state.user })},
		created() {
			this.querylist()
		},
		components: {
        },
		watch:{
		},
		mounted(){
            
		},
		methods:{
			querylist(){
                this.$http.get(global.host+"/cemetery/lifebook/query",{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
                .then((response) => {
                        if(response.body.lifebookCount=="1"){
                            this.$router.push({ path: '/cmt',query:{"hid":response.body.result}});
                        }
                        else if(response.body.lifebookCount=="2"){
							this.datalist=response.body.result;
							
                        }else if(response.body.lifebookCount=="0"){
							this.$Modal.confirm({
									width:"320",
									content: "<p>暂无数据</p>",
									onOk: () => {
										this.$router.push({ path: '/largescreen'});							
									},
									onCancel: () => {
										this.$router.push({ path: '/largescreen'});
									}
							});
						}
                        
                    })
                .catch(function (response) {
                })
            },
            birthdayTime(time){
                console.log("出生日期");                
                console.log(time);           
                function add0(m) {
					return m < 10 ? '0' + m : m
				}
				var time = new Date(parseInt(time));
				var y = time.getFullYear();
				var m = time.getMonth() + 1;
				var d = time.getDate();
				if(this.customized == 1){//判断是否需要中文
					y = this.Arabia(y);				
					m = this.Arabia2(m);				
					d = this.Arabia2(d);	
					this.birthDayAnd = " 至 ";
				    return y + '年' + add0(m) + '月' + add0(d) + '日';                    
				}else{
					this.birthDayAnd = " - ";
				    return y + '-' + add0(m) + '-' + add0(d) + '';
                }
            },
            hrefFn(index){
                this.$router.push({ path: '/cmt',query:{"hid":this.datalist[index].qrcode}});//跳转大屏列表
			},
			     Arabia(Num){
				for (var i = Num.length - 1; i >= 0; i--) {
					Num = Num.replace(",", "")//替换Num中的“,”
					Num = Num.replace(" ", "")//替换Num中的空格
				}    
				//字符处理完毕后开始转换，采用前后两部分分别转换
				var part = String(Num).split(".");
				var newchar = "";
				//小数点前进行转化
				for (i = part[0].length - 1; i >= 0; i--) {
					var tmpnewchar = ""
					var perchar = part[0].charAt(i);
					switch (perchar) {
						case "0":  tmpnewchar = "零" + tmpnewchar;break;
						case "1": tmpnewchar = "一" + tmpnewchar; break;
						case "2": tmpnewchar = "二" + tmpnewchar; break;
						case "3": tmpnewchar = "三" + tmpnewchar; break;
						case "4": tmpnewchar = "四" + tmpnewchar; break;
						case "5": tmpnewchar = "五" + tmpnewchar; break;
						case "6": tmpnewchar = "六" + tmpnewchar; break;
						case "7": tmpnewchar = "七" + tmpnewchar; break;
						case "8": tmpnewchar = "八" + tmpnewchar; break;
						case "9": tmpnewchar = "九" + tmpnewchar; break;
					}
					newchar = tmpnewchar + newchar;
				}   
				return newchar;
			},
			Arabia2(Num){				
				for (var　i = Num.length - 1; i >= 0; i--) {
						Num = Num.replace(",", "")//替换Num中的“,”
						Num = Num.replace(" ", "")//替换Num中的空格
				}    
				//字符处理完毕后开始转换，采用前后两部分分别转换
				var part = String(Num).split(".");
				var newchar = "";
				//小数点前进行转化
				for (var i = part[0].length - 1; i >= 0; i--) {
					var tmpnewchar = ""
					var perchar = part[0].charAt(i);
					switch (perchar) {
						// case "0":  tmpnewchar = "零" + tmpnewchar;break;
						case "1": tmpnewchar = "一" + tmpnewchar; break;
						case "2": tmpnewchar = "二" + tmpnewchar; break;
						case "3": tmpnewchar = "三" + tmpnewchar; break;
						case "4": tmpnewchar = "四" + tmpnewchar; break;
						case "5": tmpnewchar = "五" + tmpnewchar; break;
						case "6": tmpnewchar = "六" + tmpnewchar; break;
						case "7": tmpnewchar = "七" + tmpnewchar; break;
						case "8": tmpnewchar = "八" + tmpnewchar; break;
						case "9": tmpnewchar = "九" + tmpnewchar; break;
					}
					switch (part[0].length - i - 1) {
						case 0: tmpnewchar = tmpnewchar; break;
						case 1: if (perchar != 0) tmpnewchar = tmpnewchar + "十"; break;
						case 2: if (perchar != 0) tmpnewchar = tmpnewchar + "百"; break;
						case 3: if (perchar != 0) tmpnewchar = tmpnewchar + "千"; break;
						case 4: tmpnewchar = tmpnewchar + "万"; break;
						case 5: if (perchar != 0) tmpnewchar = tmpnewchar + "十"; break;
						case 6: if (perchar != 0) tmpnewchar = tmpnewchar + "百"; break;
						case 7: if (perchar != 0) tmpnewchar = tmpnewchar + "千"; break;
						case 8: tmpnewchar = tmpnewchar + "亿"; break;
						case 9: tmpnewchar = tmpnewchar + "十"; break;
					}
					newchar = tmpnewchar + newchar;
				}   
				//替换所有无用汉字，直到没有此类无用的数字为止
				while (newchar.search("零零") != -1 || newchar.search("零亿") != -1 || newchar.search("亿万") != -1 || newchar.search("零万") != -1) {
					newchar = newchar.replace("零亿", "亿");
					newchar = newchar.replace("亿万", "亿");
					newchar = newchar.replace("零万", "万");
					newchar = newchar.replace("零零", "零");      
				}
				//替换以“一十”开头的，为“十”
				if (newchar.indexOf("一十") == 0) {
					newchar = newchar.substr(1);
				}
				//替换以“零”结尾的，为“”
				if (newchar.lastIndexOf("零") == newchar.length - 1) {
					newchar = newchar.substr(0, newchar.length - 1);
				}
				return newchar;
			},
		}
    }
</script>